package com.ruoyi.manage.enterprise.service.impl;

import com.ruoyi.common.utils.DateUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.ListUtil;
import com.ruoyi.manage.enterprise.domain.PcProductCollection;
import com.ruoyi.manage.enterprise.mapper.PcProductCollectionMapper;
import com.ruoyi.manage.enterprise.service.IPcProductCollectionService;
import org.springframework.stereotype.Service;


/**
 * 产品收藏Service业务层处理
 *
 * @author ruoyi
 * @date 2025-08-26
 */
@Service
public class PcProductCollectionServiceImpl extends ServiceImpl<PcProductCollectionMapper, PcProductCollection> implements IPcProductCollectionService{


    @Override
    public PcProductCollection queryGetById(Long id){
        PcProductCollection pcProductCollection = this.getById(id);
        return pcProductCollection;
    }

    /**
     * 新增产品收藏
     *
     * @param pcProductCollection 产品收藏
     * @return 结果
     */
    @Override
    public boolean addPcProductCollection(PcProductCollection pcProductCollection){
        boolean save =this.save(pcProductCollection);
        return save;
    }

    /**
     * 修改产品收藏
     *
     * @param pcProductCollection 产品收藏
     * @return 结果
     */
    @Override
    public boolean updatePcProductCollection(PcProductCollection pcProductCollection){
        return this.updateById(pcProductCollection);
    }

    /**
     * 批量删除产品收藏
     *
     * @param ids 需要删除的产品收藏主键
     * @return 结果
     */
    @Override
    public boolean deletePcProductCollectionByIds(Long[] ids){
        return this.removeByIds(ListUtil.toList(ids));
    }

}
